//
//  Extension+UIButton.swift
//  PHWeibo
//
//  Created by 潘荟 on 16/7/23.
//  Copyright © 2016年 BAT. All rights reserved.
//

import UIKit

//        let sweet = creatButton("转发", norImageName: "timeline_card_bottom_background", highImageName: "timeline_card_bottom_background_highlighted", btnImageName: "timeline_icon_retweet")

extension UIButton {
    convenience init(title: String,norImageName: String,highImageName :String,btnImageName: String) {
        self.init()
        self.setTitle(title, forState: UIControlState.Normal)
        self.setTitleColor(UIColor.darkGrayColor(), forState: UIControlState.Normal)
        self.titleLabel?.font = UIFont.systemFontOfSize(15)
        self.setBackgroundImage(UIImage(named: norImageName), forState: UIControlState.Normal)
        self.setBackgroundImage(UIImage(named: highImageName), forState: UIControlState.Highlighted)
        self.setImage(UIImage(named: btnImageName), forState: UIControlState.Normal)
    }
}
